<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
	<div region="center" style="padding:1px;">
		<t:datagrid name="zyEquipmentTypeList" checkbox="false" fitColumns="false" title="设备机型" treegrid="true" pagination="false"
			actionUrl="zyEquipmentTypeController.do?datagrid" idField="id" fit="true" >
			<t:dgCol title="主键"  		field="id" treefield="id"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
			<t:dgCol title="类型描述"	field="typeDesc" treefield="text" queryMode="single"  width="400"></t:dgCol>
			
			<t:dgCol title="操作" field="opt" width="100"></t:dgCol>
			<t:dgDelOpt title="删除" url="zyEquipmentTypeController.do?doDel&id={id}" />
			<t:dgToolBar title="录入" icon="icon-add" url="zyEquipmentTypeController.do?goAdd" funname="add"></t:dgToolBar>
			<t:dgToolBar title="编辑" icon="icon-edit" url="zyEquipmentTypeController.do?goUpdate" funname="update"></t:dgToolBar>
		</t:datagrid>
	</div>
</div>
<script src = "webpage/com/zybk/zy_equipment_type/zyEquipmentTypeList.js"></script>		
<script type="text/javascript">
function add(title,url){
	var selected = $("#zyEquipmentTypeList").treegrid("getSelected");
	var parentId = "";
	if(selected != undefined){
		parentId = selected.id;
	}
	createwindow("新建设备机型",url+"&parentId="+parentId,800,300);
}
function update(title,url){
	var selected = $("#zyEquipmentTypeList").treegrid("getSelected");
	createwindow("更新设备机型",url+"&id="+selected.id,800,300);
}
</script>